]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
layout: Initialize regions unconditionally
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 17 Nov 2022 14:21:42 +0000 (15:21 +0100)
committerMarge Bot <marge-bot@gnome.org>
Fri, 18 Nov 2022 13:16:06 +0000 (13:16 +0000)
We currently initialize regions in all code paths except for the
greeter. But while there are no windows on the login screen, the
work area can still be used for positioning, for example for
notifications.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2546>

js/ui/layout.js

index 9393d04a9fa162a26bf7352cbfc645fbd2a3d559..69bf148919913d2f10bdaf5b9abec7b819c9f5a8 100644 (file)
@@ -694,18 +694,17 @@ var LayoutManager = GObject.registerClass({
         });
         this.addChrome(this._coverPane);
 
+        // Force an update of the regions before we scale the UI group to
+        // get the correct allocation for the struts.
+        // Do this even when we don't animate on restart, so that maximized
+        // windows restore to the right size.
+        this._updateRegions();
+
         if (Meta.is_restart()) {
-            // On restart, we don't do an animation. Force an update of the
-            // regions immediately so that maximized windows restore to the
-            // right size taking struts into account.
-            this._updateRegions();
+            // On restart, we don't do an animation.
         } else if (Main.sessionMode.isGreeter) {
             this.panelBox.translation_y = -this.panelBox.height;
         } else {
-            // We need to force an update of the regions now before we scale
-            // the UI group to get the correct allocation for the struts.
-            this._updateRegions();
-
             this.keyboardBox.hide();
 
             let monitor = this.primaryMonitor;